package cn.gcjxsc.service.merchant;

import cn.gcjxsc.entity.merchant.Merchant;
import cn.gcjxsc.repository.merchant.MerchantRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author pumbaa
 * @since 1.0
 */
@Service
public class MerchantService {

    @Autowired
    private MerchantRepository merchantRepository;

    public Merchant findById(Integer id) {
        return merchantRepository.findOne(id);
    }

    /**
     * 查询指定id集的商户信息
     * @param ids id集
     * @return
     */
    public List<Merchant> findByIds(List<Integer> ids) {
        return merchantRepository.findAll(ids);
    }
}
